package de.cbf.cam.dsa.facet.sf.constants;

import de.cbf.cam.dsa.facet.sf.FacetSfConstants;

public enum ESfType {
	NONE(FacetSfConstants.NAME_SF_TYPE_NONE),
	COMBAT(FacetSfConstants.NAME_SF_TYPE_COMBAT),
	CIVIL(FacetSfConstants.NAME_SF_TYPE_CIVIL),
	TERRAIN(FacetSfConstants.NAME_SF_TYPE_TERRAIN);
	
	protected String fName;

	private ESfType(String fName) {
		this.fName = fName;
	}
	
	public static ESfType getByName(String name){
		ESfType[] all = values();
		for (int i = 0; i < all.length; i++) {
			ESfType eSfType = all[i];
			if(eSfType.name().equals(name)){
				return eSfType;
			}
		}
		return null;
	}
	
	public static String getNameOf(ESfType type){
		return type.fName;
	}
	
}
